# import matplotlib.pyplot as plt
# import math
#
# # 定义三角形的边长和角度（这里假设满足正弦定理和余弦定理的情况）
# a = 3
# b = 4
# angle_A_rad = math.pi / 6
# angle_C_rad = math.pi / 3
#
# # 根据正弦定理计算B的角度
# angle_B_rad = math.asin((a * math.sin(angle_A_rad)) / b)
#
# # 计算c的长度（根据余弦定理）
# c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(angle_C_rad))
#
# # 绘制三角形（这里仅用直线连接三个点示意，并非严格的几何构造）
# fig, ax = plt.subplots()
# ax.plot([0, a], [0, 0], 'k-')
# ax.plot([a, a + b * math.cos(angle_A_rad)], [0, b * math.sin(angle_A_rad)], 'k-')
# ax.plot([a + b * math.cos(angle_A_rad), a + c], [b * math.sin(angle_A_rad), 0], 'k-')
#
# # 添加角度标注
# angle_text_A = ax.text(0.5 * (a + a + b * math.cos(angle_A_rad)),
#                        b * math.sin(angle_A_rad) / 2, r'$\alpha$', fontsize=16)
# angle_text_B = ax.text(0.5 * (a + a + b * math.cos(angle_B_rad)),
#                        -b * math.sin(angle_B_rad) / 2, r'$\beta$', fontsize=16)
# angle_text_C = ax.text(0.5 * (a + c), -0.1, r'$\gamma$', fontsize=16)
#
# # 添加边长标注
# length_text_a = ax.text(0.5 * a, 0, f'a={a}', ha='center', va='bottom', fontsize=12)
# length_text_b = ax.text(a + 0.5 * b * math.cos(angle_A_rad),
#                         b * math.sin(angle_A_rad) / 2, f'b={b}', ha='center', va='bottom', fontsize=12)
# length_text_c = ax.text(a + c / 2, -0.1, f'c={c:.2f}', ha='center', va='top', fontsize=12)
#
# # 设置坐标轴不可见
# ax.axis('off')
#
# plt.show()
